home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / admin / xinetd.2 / xinetd / xinetd.2.1.7-linux.4 / libs / src / timer / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-25  |  1.2 KB  |  43 lines

  1. /*
  2.  * (c) Copyright 1993 by Panagiotis Tsirigotis
  3.  * All rights reserved.  The file named COPYRIGHT specifies the terms 
  4.  * and conditions for redistribution.
  5.  */
  6.  
  7.  
  8. /*
  9.  * $Id: defs.h,v 3.1 1992/11/23 16:22:01 panos Exp $
  10.  */
  11.  
  12. #define PRIVATE                    static
  13.  
  14. #ifndef NULL
  15. #define NULL                        0
  16. #endif
  17.  
  18. #ifndef FALSE
  19. #define FALSE                        0
  20. #define TRUE                        1
  21. #endif
  22.  
  23. #define TIMER_NULL                ((timer_s *)0)
  24. #define SIGVEC_NULL                ((struct sigvec *)0)
  25. #define SIGACTION_NULL            ((struct sigaction *)0)
  26.  
  27. #define HANDLE_ERROR( flags, retval, errp, errval, msg )                            \
  28.                                         if ( flags & TIMER_RETURN_ERROR )            \
  29.                                         {                                            \
  30.                                             *errp = errval ;                          \
  31.                                             return( retval ) ;                        \
  32.                                         }                                            \
  33.                                         else                                         \
  34.                                         {                                            \
  35.                                             char *s = msg ;                           \
  36.                                                                                                     \
  37.                                             (void) write( 2, s, strlen( s ) ) ;       \
  38.                                             abort() ;                                 \
  39.                                             _exit( 1 ) ;                              \
  40.                                             /* NOTREACHED */                          \
  41.                                         }
  42.  
  43.